﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiToneOperatorParameters : OdRxObject
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiToneOperatorParameters(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiToneOperatorParameters_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiToneOperatorParameters obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiToneOperatorParameters()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiToneOperatorParameters(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdGiToneOperatorParameters cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiToneOperatorParameters_cast(OdRxObject.getCPtr(pObj));
			OdGiToneOperatorParameters result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiToneOperatorParameters_desc(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiToneOperatorParameters_isA(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiToneOperatorParameters_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGiToneOperatorParameters createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiToneOperatorParameters_createObject();
			OdGiToneOperatorParameters result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsEqual(OdGiToneOperatorParameters arg0)
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_IsEqual(this.swigCPtr, OdGiToneOperatorParameters.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGiToneOperatorParameters arg0)
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_IsNotEqual(this.swigCPtr, OdGiToneOperatorParameters.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGiToneOperatorParameters Assign(OdGiToneOperatorParameters arg0)
		{
			OdGiToneOperatorParameters result = (OdGiToneOperatorParameters)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiToneOperatorParameters_Assign(this.swigCPtr, OdGiToneOperatorParameters.getCPtr(arg0)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setIsActive(bool bActive)
		{
			GlobalsPINVOKE.OdGiToneOperatorParameters_setIsActive(this.swigCPtr, bActive);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool isActive()
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_isActive(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setChromaticAdaptation(bool bEnable)
		{
			GlobalsPINVOKE.OdGiToneOperatorParameters_setChromaticAdaptation(this.swigCPtr, bEnable);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool chromaticAdaptation()
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_chromaticAdaptation(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setColorDifferentiation(bool bEnable)
		{
			GlobalsPINVOKE.OdGiToneOperatorParameters_setColorDifferentiation(this.swigCPtr, bEnable);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool colorDifferentiation()
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_colorDifferentiation(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWhiteColor(OdCmEntityColor color)
		{
			GlobalsPINVOKE.OdGiToneOperatorParameters_setWhiteColor(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdCmEntityColor whiteColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiToneOperatorParameters_whiteColor(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setProcessBackground(bool bProcessBg)
		{
			GlobalsPINVOKE.OdGiToneOperatorParameters_setProcessBackground(this.swigCPtr, bProcessBg);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool processBackground()
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_processBackground(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool setBrightness(double fBrightness)
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_setBrightness(this.swigCPtr, fBrightness);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double brightness()
		{
			double result = GlobalsPINVOKE.OdGiToneOperatorParameters_brightness(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool setContrast(double fContrast)
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_setContrast(this.swigCPtr, fContrast);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double contrast()
		{
			double result = GlobalsPINVOKE.OdGiToneOperatorParameters_contrast(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool setMidTones(double fMidTones)
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_setMidTones(this.swigCPtr, fMidTones);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double midTones()
		{
			double result = GlobalsPINVOKE.OdGiToneOperatorParameters_midTones(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool setExteriorDaylight(OdGiToneOperatorParameters.ExteriorDaylightMode mode)
		{
			bool result = GlobalsPINVOKE.OdGiToneOperatorParameters_setExteriorDaylight(this.swigCPtr, (int)mode);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiToneOperatorParameters.ExteriorDaylightMode exteriorDaylight()
		{
			OdGiToneOperatorParameters.ExteriorDaylightMode result = (OdGiToneOperatorParameters.ExteriorDaylightMode)GlobalsPINVOKE.OdGiToneOperatorParameters_exteriorDaylight(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public enum ExteriorDaylightMode
		{
			kDaylightOff,
			kDaylightOn,
			kDaylightAuto
		}
	}
}
